package com.rfid.db.bean;


import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Generated;

import java.text.SimpleDateFormat;
import java.util.Date;

@Entity
public class OperateInfo {

    @org.greenrobot.greendao.annotation.Id(autoincrement = true)
    @Property(nameInDb="id")
    Long Id;

    public static final int OPERATE_BORROW = 1;
    public static final int OPERATE_RESTORE = 2;
    public static final int OPERATE_UPDATE_INFO = 3;
    public static final int OPERATE_OPEN_FAIL = 4;
    public static final int OPERATE_ADMIN_OFFSHELF = 5;
    public static final int OPERATE_ADMIN_ONSHELF = 6;

    String bookName;
    String barcode;
    int boxNum;
    int operate;
    String user;
    String date = getDate();


    @Generated(hash = 1549546796)
    public OperateInfo(Long Id, String bookName, String barcode, int boxNum,
            int operate, String user, String date) {
        this.Id = Id;
        this.bookName = bookName;
        this.barcode = barcode;
        this.boxNum = boxNum;
        this.operate = operate;
        this.user = user;
        this.date = date;
    }
    @Generated(hash = 1355353794)
    public OperateInfo() {
    }


    public Long getId() {
        return this.Id;
    }
    public void setId(Long Id) {
        this.Id = Id;
    }
    public String getBookName() {
        return this.bookName;
    }
    public void setBookName(String bookName) {
        this.bookName = bookName;
    }
    public String getBarcode() {
        return this.barcode;
    }
    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }
    public int getBoxNum() {
        return this.boxNum;
    }
    public void setBoxNum(int boxNum) {
        this.boxNum = boxNum;
    }
    public int getOperate() {
        return this.operate;
    }
    public void setOperate(int operate) {
        this.operate = operate;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public static String getDate() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return sdf.format(new Date());
    }
    public void setDate(String date) {
        this.date = date;
    }
}
